package com.lsl.singleton_pattern;

/**
 * @author Zed
 * @description
 * @date 2022/11/1 22:47
 */
public class SingletonTest {
    public static void main(String[] args) {
        Singleton singletonObj1 = Singleton.getInstance();
        Singleton singletonObj2 = Singleton.getInstance();
        if (singletonObj1 == singletonObj2) {
            System.out.println("singletonObj1和singletonObj2是相同的实例");
        } else {
            System.out.println("singletonObj1和singletonObj2是不同的实例");
        }
    }
}
